{% extends 'base.html' %}

{% block title %}首页{% endblock %}

{% block body %}
    {{ super() }}
<!-- home section starts  -->
<section class="home" id="home">
    <div class="content">
        <h3 class="gradient_text">
            <i class="fas fa-plane-departure"></i><span class="gradient_text">快乐云&trade;</span>
        </h3>
        <p class="mv4" >云上快乐&hearts;无处不在&hearts;</p>
        <a class="mv4 btn gradient" href="#pricing">订购</a>
        <a class="db mv4" target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=X1gmcenmmcSU0MGkoeOroHpBZkkmxi01&jump_from=webapi">
            <img border="0" src="//pub.idqqimg.com/wpa/images/group.png">
        </a>
    </div>

    <div class="image">
        <img src="./static/images/rocket.svg" alt="rocket">
    </div>

    <div class="cloud cloud-1"></div>
    <div class="cloud cloud-2"></div>
</section>
<!-- home section ends -->

<!-- pricing section starts  -->
<section class="pricing" id="pricing">

    <h1 class="heading"><p class="gradient_text">快乐云&trade;</p><span>价格</span> </h1>

    <div class="box-container">
        
        <div class="box">
            <form method="post" novalidate>
                <input id="user_id" name="user_id" type="hidden" value="0">
                <input id="balance" name="balance" type="hidden" value="0.0">
                <input id="area" name="area" type="hidden" value="香港③">
                <input id="loginurl" name="loginurl" type="hidden" value="">
                <!-- <input id="price" name="price" type="hidden" value="0.0"> -->
                <input id="price" name="price" required  type="hidden" value="1">
                <!-- <input id="hostsize" name="hostsize" type="hidden" value="0.0"> -->
                <input id="hostsize" name="hostsize" required type="hidden" value="100">
                <h3>免费</h3>
                <img src="./static/images/p-1.png" alt="">
                <div class="price">
                    <i class="fas fa-yen-sign"></i>0<span>/月</span>
                </div>
                <ul>
                    <li>🏃随机跑路</li>
                    <li>❓随机宕机</li>
                    <li>💾切记备份</li>
                    <li>✅弹性选择</li>
                    
                    <li class="mt3">
                        <i class="fas fa-globe"></i>
                        <select class="radios" id="hostip" name="hostip" required>
                            <option value="23.224.197.94">美国①</option>
                            <option value="23.224.230.16">美国②</option>
                            <option value="52.165.161.117">香港⑧</option>
                            <option value="154.86.26.108">香港②</option>
                        </select>
                    </li>
                </ul>

                <input class="btn gradient" id="submit" name="submit" type="submit" value="封禁中ing🙃">
                
                <div class="errors">
                    <span><label for="errs"></label></span>
                </div>
                
            </form>
        </div>
        
        <div class="box">
            <form method="post" novalidate>
                <input id="csrf_token" name="csrf_token" type="hidden" value="20220821210924##af9e801aba7bae6a9aab4178090fb0fe46adc6d3">
                <input id="user_id" name="user_id" type="hidden" value="0">
                <input id="balance" name="balance" type="hidden" value="0.0">
                <input id="area" name="area" type="hidden" value="香港③">
                <input id="loginurl" name="loginurl" type="hidden" value="">
                <!-- <input id="price" name="price" type="hidden" value="0.0"> -->
                <input id="price" name="price" required  type="hidden" value="2">
                <!-- <input id="hostsize" name="hostsize" type="hidden" value="0.0"> -->
                <input id="hostsize" name="hostsize" required type="hidden" value="200">
                <h3>自营</h3>
                <img src="./static/images/p-2.png" alt="">
                <div class="price">
                    <i class="fas fa-yen-sign"></i><p class="di calc_price">2</p><span>/月</span>
                </div>
                <ul>
                    <li>💯稳定快速</li>
                    <li>💻技术支持</li>
                    <li>✅弹性选择</li>
                    <li>⛔禁放违规内容</li>

                    <li><p class="f2 mv4">☁️大小:<span id="value"></span>M</p></li>
                    
                    <li>
                        <!-- <p class="db mv5 f2">☁️空间大小:<span id="value"></span>M</p> -->
                        <div class="slideContainer relative">
                            <input type="range" min="0" max="1000" value="100" step="100" id="myRange" class="slide">
                        </div>
                    </li>

                    <li><i class="fas fa-globe"></i><select class="radios" id="hostip" name="hostip" required><option value="23.224.197.94">美国①</option><option value="23.224.230.16">美国②</option><option value="52.165.161.117">香港⑧</option><option value="154.86.26.108">香港②</option><option value="38.55.200.147">香港①</option><option value="172.247.5.193">香港③</option></select></li>
                </ul>

                <input class="btn gradient" id="submit" name="submit" type="submit" value="订购😃">

                
                <div class="errors">
                    <span><label for="errs"></label></span>
                </div>
                
            </form>
        </div>
        
        <div class="box">
            <form method="post" novalidate>
                <input id="csrf_token" name="csrf_token" type="hidden" value="20220821210924##af9e801aba7bae6a9aab4178090fb0fe46adc6d3">
                <input id="user_id" name="user_id" type="hidden" value="0">
                <input id="balance" name="balance" type="hidden" value="0.0">
                <input id="area" name="area" type="hidden" value="香港③">
                <input id="loginurl" name="loginurl" type="hidden" value="">
                <!-- <input id="price" name="price" type="hidden" value="0.0"> -->
                <input id="price" name="price" required  type="hidden" value="3">
                <!-- <input id="hostsize" name="hostsize" type="hidden" value="0.0"> -->
                <input id="hostsize" name="hostsize" required type="hidden" value="300">
                <h3>不限内容</h3>
                <img src="./static/images/p-3.png" alt="">
                <div class="price">
                    <i class="fas fa-yen-sign"></i>3.0<span>/月</span>
                </div>
                <ul>
                    <li>✅不限内容</li>
                    <li>💯安全稳定</li>
                    <li>💻技术支持</li>
                    <li>✅弹性选择</li>
                    <li><i class="fas fa-globe"></i><select class="radios" id="hostip" name="hostip" required><option value="23.224.197.94">美国①</option><option value="23.224.230.16">美国②</option><option value="52.165.161.117">香港⑧</option><option value="154.86.26.108">香港②</option><option value="38.55.200.147">香港①</option><option value="172.247.5.193">香港③</option></select></li>
                </ul>

                <input class="btn gradient" id="submit" name="submit" type="submit" value="进货ing😃">
                
                <div class="errors">
                    <span><label for="errs"></label></span>
                </div>
                
            </form>
        </div>
        

    </div>

</section>

<!-- pricing section ends -->

<!-- idc section starts  -->
<section class="idc" id="idc">

    <h1 class="heading"><p class="gradient_text">快乐云&trade;</p><span>节点</span> </h1>

    <h2 class="tc mv5 f1"><p class="gradient_text">免费</p>🆓<span>节点状态</span> </h2>

    <div class="box-container">
        
        <div class="box">
            <div class="node">
                <div class="info">
                    <h3>美国①</h3>
                    <!-- <h3>23.224.197.94</h3> -->
                    <h3>✅<i>正常</i></h3>
                </div>
                <i class="fas fa-quote-right"></i>
            </div>
        </div>
        
        <div class="box">
            <div class="node">
                <div class="info">
                    <h3>香港②</h3>
                    <!-- <h3>154.86.26.108</h3> -->
                    <h3>❌<i>异常</i></h3>
                </div>
                <i class="fas fa-quote-right"></i>
            </div>
        </div>
        
        <div class="box">
            <div class="node">
                <div class="info">
                    <h3>香港①</h3>
                    <!-- <h3>38.55.200.147</h3> -->
                    <h3>🎖️</h3>
                </div>
                <i class="fas fa-quote-right"></i>
            </div>
        </div>
        
    </div>

    <h2 class="tc mv5 f1"><p class="gradient_text">自营</p>🍭<span>节点状态</span> </h2>

    <div class="box-container">
        
        <div class="box">
            <div class="node">
                <div class="info">
                    <h3>美国①</h3>
                    <!-- <h3>23.224.197.94</h3> -->
                    <h3>🌈</h3>
                </div>
                <i class="fas fa-quote-right"></i>
            </div>
        </div>
        
        <div class="box">
            <div class="node">
                <div class="info">
                    <h3>香港②</h3>
                    <!-- <h3>154.86.26.108</h3> -->
                    <h3>ok☁️</h3>
                </div>
                <i class="fas fa-quote-right"></i>
            </div>
        </div>
        
        <div class="box">
            <div class="node">
                <div class="info">
                    <h3>香港①</h3>
                    <!-- <h3>38.55.200.147</h3> -->
                    <h3>🍭</h3>
                </div>
                <i class="fas fa-quote-right"></i>
            </div>
        </div>
        
    </div>

</section>
<!-- idc section end  -->

{% endblock %}

{% block script %}
    {{super}}
    <script>
        var slider = document.querySelector("#myRange");
        var output = document.querySelector("#value");
        var calc_price = document.querySelector(".calc_price");
        output.innerHTML = slider.value;
        calc_price.innerHTML = slider.value / 100;

        slider.oninput = function(){
            output.innerHTML = this.value;
            output.setAttribute('data',this.value);
            calc_price.innerHTML = slider.value / 100;
            calc_price.setAttribute('data',this.value / 100);
            console.log('input slider v : ' + this.value );
            var x = this.value / 10;
            console.log('x ' + x );
            var color = 'linear-gradient(90deg, rgb(107, 111, 237)' + x + '%, rgb(214, 214, 214)' + x +'%)';
            slider.style.background = color;
        }
        // backup for every thing
        slider.addEventListener("mousemove",function(){
            var x = slider.value / 10;
            // console.log('x ' + x );
            var color = 'linear-gradient(90deg, rgb(107, 111, 237)' + x + '%, rgb(214, 214, 214)' + x +'%)';
            slider.style.background = color;
        })
    </script>
{% endblock %}
